<?php 
class  globals
{

	const MENU_TYPE_MAIN_MENU_ID = 'main menu';
	const MENU_TYPE_FOOTER_MENU_ID = 'footer menu';

	const IS_STRIP_HTML_TAGS = false;



	const CATEGORY_PAGES = 1;
	const CATEGORY_ID_NEWS = 2;
	const CATEGORY_LIST_LIMIT = 2;


	const GMT_TIME_DIFFERANCE = 2; // in hours
	const NOT_AVAILALBE  = 'N.A';
	const CRITERIA_DATE_FORMAT  = 'j/n/Y h:i:s A';
	const DATE_FORMAT           = 'd/m/Y';
	//const DATE_NULL         = '1999-01-01';
	const DATE_NULL         = null;
	const CHOOSE_EMPTY_VALUE    = '--choose one--';
	const DEMO_BRANCH_ID    = 1;
	const DEMO_BRANCH_OWNER_EMAIL    = 'amin.shoman@gmail.com';
	const DEMO_BRANCH_OWNER_NAME    = 'Ameen Shoman';
	const DEMO_SECTION_ID   = 1;
	const DEMO_DEPT_ID      = 1;
	const DEMO_DAWAM_START_TIME      = "08:00";
	const DEMO_DAWAM_END_TIME      = "17:00";

	const NO_TRANSACTION             = -1;
	const LEAVE_TRANSACTION          = 1;
	const NON_CALCULATED_TRANSACTION   = 2;


	const NO_CLOSEING_LEAVE_START          = 3;
	const NO_CLOSEING_LEAVE_END          = 4;


	const NO_CLOSEING_NON_CALCALUATED_TRANSACTION_START = 5;
	const NO_CLOSEING_NON_CALCALUATED_TRANSACTION_END = 6;

	public static $FILES_TYPE_ALLOWED = array(
		'csv'
	);
	
	public static $TRANSACTION_LIST = array(
	self::NO_CLOSEING_LEAVE_START                        => "No Closing Leave start"
	, self::NO_CLOSEING_LEAVE_END                        => "No Closing Leave end"
	, self::NO_CLOSEING_NON_CALCALUATED_TRANSACTION_START => "No Closing non calclated Start"
	, self::NO_CLOSEING_NON_CALCALUATED_TRANSACTION_END => "NO Closing non calclated end"
	, self::NO_TRANSACTION               => "No transaction"
	, self::LEAVE_TRANSACTION                       => "Leave transaction"
	, self::NON_CALCULATED_TRANSACTION                       => "Leave transaction"
	);

	#########
	#public static $REPORT_TYPE_LIST =

	#########
	const VACATION_TYPE_HOLIDAY  = 1;
	const VACATION_TYPE_PAID  = 2;
	const VACATION_TYPE_UN_PAID  = 3;

	public static $VACATION_TYPE_LIST = array(
	'' => globals::CHOOSE_EMPTY_VALUE
	,self::VACATION_TYPE_UN_PAID => "Unpiad vaction"
	,self::VACATION_TYPE_PAID => "paid vaction"
	,self::VACATION_TYPE_HOLIDAY => "Holiday"
	);

	public static $SUPERADMIN_PERMISSIONS = array(
	1,
	);
	public static $SUPERADMIN_GROUPS = array(

	);


	public static function _format_period($time){
		$format = CMS_globals::get_admin_attr('period_time_format',1);
		switch ($format){
			case 2 :
				return date('H:h',$time);
				break;
			default:
				return sprintf('%01.2f',$time/3600) .' H';
				break;
		}
	}


}

